//
// Created by bxw57 on 2024/6/13.
//

#include <iostream>
#include "Base.h"
using namespace std;

template<class T>
void Base<T>::run() {
    //测试增加
    for (int i = 0; i < 10; i++) {
        this->push(i);
    }
    cout << "test push : ";
    this->show();
    //测试删除
    T val = this->pop();
    cout << "test delete : " << val << endl;
    this->show();
}

template<class T>
void Base<T>::show() {
    for (int i=0; i < top; i++) {
        cout << arr[i] << " ";
    }
    cout << endl;
}